home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 92 / CDMM92_1.ISO / SOF 2 SDK / sof2sdk-101.msi / _92D6AC311BB48EBA344BBABC89DA6AB0 / _D740DC636BB14C19A4DB6B205BE5CC5D < prev    next >
Encoding:
Text File  |  2002-06-05  |  2.4 KB  |  89 lines

  1. // Copyright (C) 2001-2002 Raven Software
  2. //
  3.  
  4. /*****************************************************************************
  5.  * name:        be_ai_weap.h
  6.  *
  7.  * desc:        weapon AI
  8.  *
  9.  * $Archive: /source/code/botlib/be_ai_weap.h $
  10.  * $Author: Mrelusive $ 
  11.  * $Revision: 2 $
  12.  * $Modtime: 10/05/99 3:32p $
  13.  * $Date: 10/05/99 3:42p $
  14.  *
  15.  *****************************************************************************/
  16.  
  17. //projectile flags
  18. #define PFL_WINDOWDAMAGE            1        //projectile damages through window
  19. #define PFL_RETURN                    2        //set when projectile returns to owner
  20. //weapon flags
  21. #define WFL_FIRERELEASED            1        //set when projectile is fired with key-up event
  22. //damage types
  23. #define DAMAGETYPE_IMPACT            1        //damage on impact
  24. #define DAMAGETYPE_RADIAL            2        //radial damage
  25. #define DAMAGETYPE_VISIBLE            4        //damage to all entities visible to the projectile
  26.  
  27. typedef struct projectileinfo_s
  28. {
  29.     char name[MAX_STRINGFIELD];
  30.     char model[MAX_STRINGFIELD];
  31.     int flags;
  32.     float gravity;
  33.     int damage;
  34.     float radius;
  35.     int visdamage;
  36.     int damagetype;
  37.     int healthinc;
  38.     float push;
  39.     float detonation;
  40.     float bounce;
  41.     float bouncefric;
  42.     float bouncestop;
  43. } projectileinfo_t;
  44.  
  45. typedef struct weaponinfo_s
  46. {
  47.     int valid;                    //true if the weapon info is valid
  48.     int number;                                    //number of the weapon
  49.     char name[MAX_STRINGFIELD];
  50.     char model[MAX_STRINGFIELD];
  51.     int level;
  52.     int weaponindex;
  53.     int flags;
  54.     char projectile[MAX_STRINGFIELD];
  55.     int numprojectiles;
  56.     float hspread;
  57.     float vspread;
  58.     float speed;
  59.     float acceleration;
  60.     vec3_t recoil;
  61.     vec3_t offset;
  62.     vec3_t angleoffset;
  63.     float extrazvelocity;
  64.     int ammoamount;
  65.     int ammoindex;
  66.     float activate;
  67.     float reload;
  68.     float spinup;
  69.     float spindown;
  70.     projectileinfo_t proj;                        //pointer to the used projectile
  71. } weaponinfo_t;
  72.  
  73. //setup the weapon AI
  74. int BotSetupWeaponAI(void);
  75. //shut down the weapon AI
  76. void BotShutdownWeaponAI(void);
  77. //returns the best weapon to fight with
  78. int BotChooseBestFightWeapon(int weaponstate, int *inventory);
  79. //returns the information of the current weapon
  80. void BotGetWeaponInfo(int weaponstate, int weapon, weaponinfo_t *weaponinfo);
  81. //loads the weapon weights
  82. int BotLoadWeaponWeights(int weaponstate, char *filename);
  83. //returns a handle to a newly allocated weapon state
  84. int BotAllocWeaponState(void);
  85. //frees the weapon state
  86. void BotFreeWeaponState(int weaponstate);
  87. //resets the whole weapon state
  88. void BotResetWeaponState(int weaponstate);
  89.